package com.wy2.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.wy2.entity.RoleModule;

@Mapper
public interface RoleModuleMapper{

	/**
	 * 添加方法 
	 * @param ro
	 * @return
	 */
		Integer addsave(RoleModule ro);
	/**
	 * 通过角色id查询条数
	 * @param rid
	 * @return
	 */
		@Select("select m.id from module m inner join rolemodule rm on m.id = rm.mid where rm.rid = #{rid} and m.parentid <> 0")
		List<Integer> getByRid(String rid);



}
